#ifndef __Utils_H__
#define __Utils_H__
#include "cocos2d.h"
#include "Prefabs.h"
#include <string>
using namespace std;
USING_NS_CC;
enum {
	NONE,
	UP,
	DOWN,
	LEFT,
	RIGHT
};
enum{
	IDLE,
	MOVE,
	INJURED,
	ATTACK,
};
class CUtils
{
public:
	static CUtils* getInstance();
	~CUtils();
	void init();
	void initAnimation(vector<string>, string);
	void initAnimationWithIdex(int start,int end,char* picName,string aniName);
	void runAnimation(Sprite*, string);
	void runAnimationOnce(Sprite*,string);
	static bool isInRadius(Vec2 center,float radius,Vec2 aim);
private:
	static CUtils* _Instance;
	CUtils();
	AnimationCache* m_pAniCache;
};



#endif